﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Admin_Admin : System.Web.UI.MasterPage
{
    protected void Page_Load(object sender, EventArgs e)
    {
        string tendangnhap = (string)Session["tendangnhap"];
        int thanhvienId = Convert.ToInt32(Session["thanhvienId"]);
        int quyen=Convert.ToInt32(Session["phanquyenId"]);
        if ((tendangnhap != "" && quyen == 2) || (tendangnhap != "" && quyen == 1))
        {
            lblxinchao.Text = tendangnhap;
            pnchao.Visible = true;
        }
        else
        {
            Response.Redirect("~/ThongBaoQuyen.aspx");
        }
    }
    protected void lbtndangxuat_Click(object sender, EventArgs e)
    {
        Session["tendangnhap"] = null;
        Session["phanquyenId"] = null;
        Response.Redirect("~/Default.aspx");
    }
}
